import { LoginParams, PositionData, RegisterParams } from "@/apis/types";
import { StateTree, StoreActions, StoreGetters } from "pinia";
import { ResponseData } from "../types";

export declare interface userState extends StateTree {
    [key: string]: any
    id?: string
    username?: string
    avatar?: string
    cover?: string
    email?: string
    role?: string
    token?: string
    pos?: PositionData
}
export declare interface userActions extends StoreActions<userState> {
    _login: (form: LoginParams) => void
    _register: (form: RegisterParams) => void
    _getPosition: () => void;
}
export declare interface userGetters extends StoreGetters<userState> {
}

export declare type UserResponseData = {
    token: string
}

export declare type User = ResponseData & {
    username: string
    password?: string
    phone?: string
    email?: string
    avatar: string
    cover: string
    role: string
    status: string
    token?: string
    bio: string
    lastLoginAt: string
}